﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Com.ContentRendering.Api.LoaderEngine.Section;

namespace Com.ContentRendering.Api.LoaderEngine
{
    /// <summary/>
    internal class SectionReader
    {
        private List<string> _sections;
        private int _index;

        /// <summary/>
        internal SectionReader(List<string> sections)
        {
            this._sections = sections;
        }

        /// <summary/>
        internal bool MoveNext()
        {
            // if there is no more data indicate it
            if (this._index >= this._sections.Count)
            {
                return false;
            }

            // increase the index
            this._index++;

            return true;
        }

        /// <summary/>
        internal string Section
        {
            get { return this._sections[this._index - 1]; }
        }
    }
}
